package com.jml.async;

import com.jml.jdbc.annotationdemo.User;
import com.jml.jdbc.annotationdemo.UserRowMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.sql.Types;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {


	@Async
	@Override
	public Integer save(User user) {
		System.out.println("异步执行："+ Thread.currentThread().getName());
		return 100;
	}

}
